<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/12/30 0030
  Time: 12:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>夙愿贴吧</title>
    <%--引用jquery--%>
    <script type="text/javascript" src="static/js/jquery-3.3.1.min.js"></script>
    <%--引入Jquery--%>
    <%--引入样式--%>
    <link href="static/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

</head>
<body>

<form action="makePost.jsp">
    <BUTTON class="btn btn-success">我要发帖</BUTTON>
</form>
<form action="/topicListService.do">
    <BUTTON class="btn btn-success">返回主页</BUTTON>
</form>
<div class="container">
    <table class="table">
        <thead>
        <tr class="info" style="font-weight:bold;" >
            <th>标题</th>
            <th>发帖人</th>
            <th>内容</th>
            <th>发帖时间</th>
            <th>浏览量</th>
        </tr>
        </thead>
        <tbody>
            <tr class="danger">
                <td>${topic.title}</td>
                <td>${topic.author}</td>
                <td>${topic.content}</td>
                <td><fmt:formatDate value="${topic.cretime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                <td>${topic.amount}</td>
            </tr>
        </tbody>
    </table>
</div>

<div class="container">
    <table class="table">
        <thead>
        <tr class="info" style="font-weight:bold;" >
            <th>昵称</th>
            <th>评论时间</th>
            <th>内容</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${replylist}" var="replys">
            <tr class="danger" id="dataTopic">
                <td>${replys.author}</td>
                <td><fmt:formatDate value="${replys.cretime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                <td>${replys.content}</td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>

<div>
    <form action="/addReplyInf.do"  method="post" >
        <input   type="hidden"  name="topicid" value="${topicId}" >
        <p class="text-primary">昵称：<input   type="text"  name="reply_author" style="height: 50px; width: 315px" ></p><br>
        <p class="text-primary">内容: <textarea  name="reply_context" class="form-control" rows="3" style="margin: 0px 1031px 0px 0px; height: 300px; width: 360px; resize: none"></textarea></p>
        <BUTTON class="btn btn-success col-md-2 " >评论</BUTTON> 
    </form>

</div>



</body>
</html>
